﻿CREATE TABLE [dbo].[forum_Section] (
    [SectionId]       SMALLINT       IDENTITY (1, 1) NOT NULL,
    [ParentSectionId] SMALLINT       NULL,
    [LeftKey]         INT            NOT NULL,
    [RightKey]        INT            NOT NULL,
    [Level]           TINYINT        NOT NULL,
    [HashTag]         NVARCHAR (64)  NOT NULL,
    [Name]            NVARCHAR (128) NOT NULL,
    CONSTRAINT [PK_forum_Section] PRIMARY KEY CLUSTERED ([SectionId] ASC),
    CONSTRAINT [IX_forum_Section_HashTag] UNIQUE NONCLUSTERED ([HashTag] ASC)
);






GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_forum_Section_RightKey]
    ON [dbo].[forum_Section]([RightKey] ASC);


GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_forum_Section_LeftKey]
    ON [dbo].[forum_Section]([LeftKey] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_forum_Section_Level]
    ON [dbo].[forum_Section]([Level] ASC);


GO


